home *** CD-ROM | disk | FTP | other *** search
/ Bath / Bath CDROM.iso / pc / BATH.DXR / Internal_2_Movie.ls < prev    next >
Encoding:
Text File  |  2001-07-26  |  1.8 KB  |  100 lines

  1. global selector, map, selectionMade, nextQuestion
  2.  
  3. on prepareMovie
  4.   selectionMade = 0
  5.   if the platform contains "Windows" then
  6.     platformDelimiter = "\"
  7.   else
  8.     platformDelimiter = ":"
  9.   end if
  10.   add(the searchPaths, the moviePath & "media")
  11.   add(the searchPaths, the moviePath & "media" & platformDelimiter & "video")
  12.   add(the searchPaths, the moviePath & "media/audio")
  13. end
  14.  
  15. on startMovie
  16.   selector = new(script("selector"))
  17.   sprite(66).visible = 0
  18.   sprite(67).visible = 0
  19.   sprite(68).visible = 0
  20.   repeat with i = 44 to 65
  21.     set the cursor of sprite i to 280
  22.   end repeat
  23.   set the volume of sound 1 to 255
  24.   nextQuestion = random(15)
  25. end
  26.  
  27. on stopMovie
  28.   if not map then
  29.     return 
  30.   end if
  31.   if map.visible then
  32.     map.visible = 0
  33.     forget(map)
  34.   end if
  35. end
  36.  
  37. on createMap
  38.   maptop = 406
  39.   mapleft = 553
  40.   mapwidth = 218
  41.   mapheight = 161
  42.   map = window("map")
  43.   map.windowType = 2
  44.   map.rect = rect(the stageLeft + mapleft, the stageTop + maptop, the stageLeft + mapleft + mapwidth, the stageTop + maptop + mapheight)
  45.   moveToFront(map)
  46.   window("map").visible = 1
  47.   tell map
  48.     zoom(1.01000000000000001)
  49.   end tell
  50. end
  51.  
  52. on showMap
  53.   if not map then
  54.     createMap()
  55.   end if
  56.   tell map
  57.     go(1)
  58.   end tell
  59.   window("map").visible = 1
  60.   moveToFront(map)
  61. end
  62.  
  63. on hideMap
  64.   if not map then
  65.     return 
  66.   end if
  67.   window("map").visible = 0
  68.   moveToBack(window("map"))
  69. end
  70.  
  71. on bringMapToFront
  72.   if not map then
  73.     createMap()
  74.   end if
  75.   if map and map.visible then
  76.     moveToFront(map)
  77.   end if
  78. end
  79.  
  80. on mapGotoSite site
  81.   if not map then
  82.     createMap()
  83.   end if
  84.   if map.visible then
  85.     tell map
  86.       gotoSite(site)
  87.     end tell
  88.   end if
  89. end
  90.  
  91. on showLabel str
  92.   member("pdaLabel").text = str
  93. end
  94.  
  95. on jumpToSite site
  96.   go("wait")
  97.   selectionMade = 1
  98.   setSite(selector, site)
  99. end
  100.